package com.qnbc.mystery.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qnbc.mystery.core.annotation.Excel;
import com.qnbc.mystery.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.util.Date;

/**
 * 商品评论对象 pro_comment
 *
 * @author guzj
 * @date 2024-01-24
 */
public class ProComment implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    /** 编号 */
    @TableId(type = IdType.AUTO)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date addtime;

    /**
     * 关联表id
     */
    @Excel(name = "关联表id")
    private Long refid;

    /**
     * 用户id
     */
    @Excel(name = "用户id")
    private Long userid;

    /**
     * 用户名
     */
    @Excel(name = "用户名")
    private String nickname;

    /**
     * 评论内容
     */
    @Excel(name = "评论内容")
    private String content;

    /**
     * 回复内容
     */
    @Excel(name = "回复内容")
    private String reply;

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setAddtime(Date addtime) {
        this.addtime = addtime;
    }

    public Date getAddtime() {
        return addtime;
    }

    public void setRefid(Long refid) {
        this.refid = refid;
    }

    public Long getRefid() {
        return refid;
    }

    public void setUserid(Long userid) {
        this.userid = userid;
    }

    public Long getUserid() {
        return userid;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getNickname() {
        return nickname;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public void setReply(String reply) {
        this.reply = reply;
    }

    public String getReply() {
        return reply;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("addtime", getAddtime())
                .append("refid", getRefid())
                .append("userid", getUserid())
                .append("nickname", getNickname())
                .append("content", getContent())
                .append("reply", getReply())
                .toString();
    }
}
